using SqlSugar;
using System.ComponentModel.DataAnnotations;
namespace Jst.Domain
{
    [SugarTable("Permission", TableDescription = "路由菜单表")]
    public partial class Permission
    {
        /// <summary>
        /// Id
        /// </summary>
        [Display(Name = "Id")]
        [SugarColumn(ColumnDescription = "Id", IsNullable = false, IsPrimaryKey = true, IsIdentity = false)]
        [Required(ErrorMessage = "请输入{0}")]
        public long Id { get; set; }

        /// <summary>
        /// 菜单执行Action名
        /// </summary>
        [Display(Name = "菜单执行Action名")]
        [SugarColumn(ColumnDescription = "菜单执行Action名", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [StringLength(50, ErrorMessage = "【{0}】不能超过{1}字符长度")]
        public string Code { get; set; }

        /// <summary>
        /// 菜单显示名（如用户页、编辑(按钮)、删除(按钮)）
        /// </summary>
        [Display(Name = "菜单显示名（如用户页、编辑(按钮)、删除(按钮)）")]
        [SugarColumn(ColumnDescription = "菜单显示名（如用户页、编辑(按钮)、删除(按钮)）", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [StringLength(50, ErrorMessage = "【{0}】不能超过{1}字符长度")]
        public string Name { get; set; }

        /// <summary>
        /// 是否是按钮
        /// </summary>
        [Display(Name = "是否是按钮")]
        [SugarColumn(ColumnDescription = "是否是按钮", IsNullable = false, IsPrimaryKey = false, IsIdentity = false)]
        [Required(ErrorMessage = "请输入{0}")]
        public bool IsButton { get; set; }

        /// <summary>
        /// 是否是隐藏菜单
        /// </summary>
        [Display(Name = "是否是隐藏菜单")]
        [SugarColumn(ColumnDescription = "是否是隐藏菜单", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [Required(ErrorMessage = "请输入{0}")]
        public bool IsHide { get; set; }

        /// <summary>
        /// 是否keepAlive
        /// </summary>
        [Display(Name = "是否keepAlive")]
        [SugarColumn(ColumnDescription = "是否keepAlive", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [Required(ErrorMessage = "请输入{0}")]
        public bool IskeepAlive { get; set; }

        /// <summary>
        /// 按钮事件
        /// </summary>
        [Display(Name = "按钮事件")]
        [SugarColumn(ColumnDescription = "按钮事件", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [StringLength(100, ErrorMessage = "【{0}】不能超过{1}字符长度")]
        public string Func { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        [Display(Name = "排序")]
        [SugarColumn(ColumnDescription = "排序", IsNullable = false, IsPrimaryKey = false, IsIdentity = false)]
        [Required(ErrorMessage = "请输入{0}")]
        public int OrderSort { get; set; }

        /// <summary>
        /// 菜单图标
        /// </summary>
        [Display(Name = "菜单图标")]
        [SugarColumn(ColumnDescription = "菜单图标", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [StringLength(100, ErrorMessage = "【{0}】不能超过{1}字符长度")]
        public string Icon { get; set; }

        /// <summary>
        /// 菜单描述
        /// </summary>
        [Display(Name = "菜单描述")]
        [SugarColumn(ColumnDescription = "菜单描述", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [StringLength(100, ErrorMessage = "【{0}】不能超过{1}字符长度")]
        public string Description { get; set; }

        /// <summary>
        /// 激活状态
        /// </summary>
        [Display(Name = "激活状态")]
        [SugarColumn(ColumnDescription = "激活状态", IsNullable = false, IsPrimaryKey = false, IsIdentity = false)]
        [Required(ErrorMessage = "请输入{0}")]
        public bool Enabled { get; set; }

        /// <summary>
        /// 创建ID
        /// </summary>
        [Display(Name = "创建ID")]
        [SugarColumn(ColumnDescription = "创建ID", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [Required(ErrorMessage = "请输入{0}")]
        public long CreateId { get; set; }

        /// <summary>
        /// 创建者
        /// </summary>
        [Display(Name = "创建者")]
        [SugarColumn(ColumnDescription = "创建者", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [StringLength(50, ErrorMessage = "【{0}】不能超过{1}字符长度")]
        public string CreateBy { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Display(Name = "创建时间")]
        [SugarColumn(ColumnDescription = "创建时间", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [Required(ErrorMessage = "请输入{0}")]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 修改ID
        /// </summary>
        [Display(Name = "修改ID")]
        [SugarColumn(ColumnDescription = "修改ID", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [Required(ErrorMessage = "请输入{0}")]
        public long ModifyId { get; set; }

        /// <summary>
        /// 修改者
        /// </summary>
        [Display(Name = "修改者")]
        [SugarColumn(ColumnDescription = "修改者", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [StringLength(50, ErrorMessage = "【{0}】不能超过{1}字符长度")]
        public string ModifyBy { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        [Display(Name = "修改时间")]
        [SugarColumn(ColumnDescription = "修改时间", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [Required(ErrorMessage = "请输入{0}")]
        public DateTime ModifyTime { get; set; }

        /// <summary>
        /// 获取或设置是否禁用，逻辑上的删除，非物理删除
        /// </summary>
        [Display(Name = "获取或设置是否禁用，逻辑上的删除，非物理删除")]
        [SugarColumn(ColumnDescription = "获取或设置是否禁用，逻辑上的删除，非物理删除", IsNullable = true, IsPrimaryKey = false, IsIdentity = false)]
        [Required(ErrorMessage = "请输入{0}")]
        public bool IsDeleted { get; set; }

        /// <summary>
        /// Pid
        /// </summary>
        [Display(Name = "Pid")]
        [SugarColumn(ColumnDescription = "Pid", IsNullable = false, IsPrimaryKey = false, IsIdentity = false)]
        [Required(ErrorMessage = "请输入{0}")]
        public long Pid { get; set; }

        /// <summary>
        /// Mid
        /// </summary>
        [Display(Name = "Mid")]
        [SugarColumn(ColumnDescription = "Mid", IsNullable = false, IsPrimaryKey = false, IsIdentity = false)]
        [Required(ErrorMessage = "请输入{0}")]
        public long Mid { get; set; }

    }
}
